<template>
	<page-body>
		<view class="page">
			<view class="flex align-stretch benben-position-layout flex myNews_flex_0_higd"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex align-center justify-between flex-sub myNews_fd0_0_higd'>
					<view class='flex align-center myNews_fd0_0_c0_higd' >
						<!-- <text class='fu-iconfont2  myNews_fd0_0_c0_c0_higd'>&#xE794;</text> -->
					</view>
					<view class='flex align-center'>
						<text class='myNews_fd0_0_c1_c0_higd'>{{$t('我的消息')}}</text>
					</view>
					<view class='flex align-center myNews_fd0_0_c0_higd'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>

			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
				<view class='flex flex-direction align-stretch'>
					<template >
						<view class='flex flex-wrap align-center myNews_fd1_0_c0_higd' @tap.stop="handleJumpDiy"
							data-type="navigateTo" :data-url="`/pages/xtxx/platformAnnouncement/platformAnnouncement`">
							<view class='flex flex-wrap align-center myNews_fd1_0_c0_c0_higd'>
								<image class='myNews_fd1_0_c0_c0_c0_higd' mode="aspectFit" :src='STATIC_URL+"88.png"'>
								</image>
								<benben-message-num :message-num="num"  class='myNews_fd1_0_c0_c0_c1_higd' size='20' color='#fff'
									background-color='red'>
								</benben-message-num>
							</view>
							<view class='flex flex-direction flex-wrap align-stretch flex-sub myNews_fd1_0_c0_c1_higd'>
								<view class='flex flex-wrap align-center myNews_fd1_0_c0_c1_c0_higd'>
									<text class='flex-sub myNews_fd1_0_c0_c1_c0_c0_higd'>{{$t('平台公告')}}</text>
									<text class='myNews_fd1_0_c0_c1_c0_c1_higd'>{{create_time}}</text>
								</view>
								<text class='myNews_fd1_0_c0_c1_c1_higd'>{{synopsis}}</text>
							</view>
						</view>
					</template>
					<!-- <template v-for='(item,key0) in dataList'>
						<view class='flex flex-wrap align-center myNews_fd1_0_c0_higd' @tap.stop="handleJumpDiy"
							data-type="navigateTo" :data-url="`/pages/xtxx/platformAnnouncement/platformAnnouncement`"
							v-if="key0==0" :key='key0'>
							<view class='flex flex-wrap align-center myNews_fd1_0_c0_c0_higd'>
								<image class='myNews_fd1_0_c0_c0_c0_higd' mode="aspectFit" :src='STATIC_URL+"88.png"'>
								</image>
								<benben-message-num :message-num="num"  class='myNews_fd1_0_c0_c0_c1_higd' size='20' color='#fff'
									background-color='red'>
								</benben-message-num>
							</view>
							<view class='flex flex-direction flex-wrap align-stretch flex-sub myNews_fd1_0_c0_c1_higd'>
								<view class='flex flex-wrap align-center myNews_fd1_0_c0_c1_c0_higd'>
									<text class='flex-sub myNews_fd1_0_c0_c1_c0_c0_higd'>{{$t('平台公告')}}</text>
									<text class='myNews_fd1_0_c0_c1_c0_c1_higd'>{{item.create_time}}</text>
								</view>
								<text class='myNews_fd1_0_c0_c1_c1_higd'>{{item.synopsis}}</text>
							</view>
						</view>
					</template> -->

				</view>
			<!-- 	<view class='flex flex-wrap align-center myNews_fd1_1_higd'>
				</view>
				<view class='flex flex-direction align-stretch'>
					<template v-for='(item,key0) in chatList'>
						<view class='flex flex-wrap align-center myNews_fd1_2_c0_higd' :key='key0' v-if="key0==0">
							<view class='flex flex-wrap align-center myNews_fd1_0_c0_c0_higd'>
								<image class='myNews_fd1_0_c0_c0_c0_higd' mode="aspectFit" :src='item.head_img'></image>
								<benben-message-num class='myNews_fd1_0_c0_c0_c1_higd' :message-num="num"
									size='20' color='#fff' background-color='red'>
								</benben-message-num>
							</view>
							<view class='flex flex-direction flex-wrap align-stretch flex-sub myNews_fd1_0_c0_c1_higd'>
								<view class='flex flex-wrap align-center myNews_fd1_0_c0_c1_c0_higd'>
									<text class='flex-sub myNews_fd1_0_c0_c1_c0_c0_higd'>{{item.nickname}}</text>
									<text class='myNews_fd1_0_c0_c1_c0_c1_higd'>{{item.create_time}}</text>
								</view>
								<text class='myNews_fd1_0_c0_c1_c1_higd'>{{item.content}}</text>
							</view>
						</view>
					</template>

				</view> -->
			</view>




		</view>
	</page-body>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},


		data() {
			return {
				"dataList": [],
				"chatList": [],
				/** chat_url【客服链接】 **/
				"chatMessage": {
					"chat_url": ""
				},
				"news": [],
				article:0,
				create_time:'',
				synopsis:'',
				num:0
			};
		},
		computed: {
			isLogin() {
				return uni.getStorageSync('USER_TOKEN_7863') == '' ? false : true;
			}
		},
		watch: {},
		onLoad(options) {

		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			this.getrj7403193ed6fcFunc()
			this.getke8478b189b32dFunc()
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//跳转页面
			goListFunc(type) {
				if (type == '2') {

				} else if (type == '3') {

				}
			},
			//查询平台公告列表
			async getrj7403193ed6fcFunc() {
				//请求方法
				//数据验证

				let datadataList = await this.$api.get(global.apiUrls.post67403193ed6fc, {
				});

				if (datadataList.data.code != 1) {
					this.$message.info(datadataList.data.msg);
					return
				}
				let infodataList = datadataList.data.data;
				this.dataList = infodataList.data
				this.synopsis=this.dataList.length>0?this.dataList[0].synopsis:'暂无公告'
				this.create_time=this.dataList.length>0?this.dataList[0].create_time:''

			},
			//查询未读数量
			async getke8478b189b32dFunc() {
				console.log(this.isLogin)
				console.log(99999)
				if (this.isLogin === true) {
					//请求方法
					//数据验证
					let obj={}
					// 教师要穿员工id
					if(uni.getStorageSync('USER_GROUP')==2){
						 obj={
							// article_id: this.id,
							memberuser_id:uni.getStorageSync('USER_INFO_7863').aid
						}
						
					}else{
						obj={
							// article_id: this.id,
							
						}
					}
					console.log(obj)
					let dataxginfo = await this.$api.get(global.apiUrls.post684b8709433e9, obj);

					if (dataxginfo.data.code != 1) {
						this.article=0
					}
					let infoxginfo = dataxginfo.data;
					this.num = infoxginfo.data.site_msg
					console.log(this.num)

				} else {
					this.toLoginDiy();
				}
			},
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #fff;
		background-size: 100% auto;

		.myNews_fd1_0_c0_higd {
			margin: 32rpx 32rpx 0rpx 32rpx;
			padding: 0rpx 0rpx 32rpx 0rpx;
			border-bottom: 1px solid rgba(238, 238, 238, 1);
		}

		.myNews_fd1_0_c0_c0_higd {
			position: relative;
		}

		.myNews_fd1_0_c0_c0_c0_higd {
			width: 90rpx;
			height: 90rpx;
			border-radius: 16rpx;
		}

		.myNews_fd1_0_c0_c0_c1_higd {
			position: absolute;
			top: -10rpx;
			right: -10rpx;
		}

		.myNews_fd1_0_c0_c1_higd {
			margin: 0rpx 0rpx 0rpx 24rpx;
			
		}

		.myNews_fd1_0_c0_c1_c0_higd {
			margin: 0rpx 0rpx 17rpx 0rpx;
		}

		.myNews_fd1_0_c0_c1_c0_c0_higd {
			line-height: 40rpx;
			font-size: 28rpx;
			font-weight: 500;
			color: #333333;
			-webkit-line-clamp: 1;
			overflow: hidden;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-box-orient: vertical;
		}

		.myNews_fd1_0_c0_c1_c0_c1_higd {
			line-height: 28rpx;
			font-size: 24rpx;
			font-weight: 400;
			color: rgba(153, 153, 153, 1);
			margin: 0rpx 0rpx 0rpx 24rpx;
		}

		.myNews_fd1_0_c0_c1_c1_higd {
			line-height: 33rpx;
			font-size: 24rpx;
			font-weight: 400;
			color: #999999;
			-webkit-line-clamp: 1;
			overflow: hidden;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-box-orient: vertical;
		}

		.myNews_fd1_1_higd {
			border-radius: 0rpx 0rpx 0rpx 0rpx;
			background: #F8F8F8;
			width: 750rpx;
			height: 20rpx;
		}

		.myNews_fd1_2_c0_higd {
			margin: 32rpx 032rpx 0rpx 32rpx;
		}

		.myNews_flex_0_higd {
			width: 750rpx;
			height: 88rpx;
			overflow: hidden;
			z-index: 10;
			top: 0rpx;
			background: #fff;
			background-size: 100% auto !important;

			.myNews_fd0_0_higd {
				padding: 0rpx 32rpx 0rpx 32rpx;
				line-height: 88rpx;

				.myNews_fd0_0_c1_c0_higd {
					font-size: 36rpx;
					font-weight: 500;
					color: #333;
				}
			}
		}

		.myNews_fd0_0_c0_higd {
			width: 180rpx;

			.myNews_fd0_0_c0_c0_higd {
				font-size: 32rpx;
				font-weight: 500;
				color: #333;
			}
		}
	}
</style>
